const Base = require('./base.js');

module.exports = class extends Base {
	constructor(ctx) {
		super(ctx);
		this.qrcode = this.model("taoke/qrcode");
	}
	async indexAction(){
		if(this.isGet) {
			return this.display();
		}

		let posts = this.post();
		let where = {};
  
		let fields = "id,qrcode_url,user_id,type,share_num,create_time";
		const data = await this.qrcode.joinUserTable(posts,where,fields);
		return this.json(data);
		
	}
	
};